<?php
namespace App\Model;


use App\Utility\Db\Redis;

class Queue
{
    const QUEUE_NAME = QUEUE_NAME;

    static function set($tid){
        return Redis::getInstance()->rPush(self::QUEUE_NAME,$tid);
    }
    static function pop(){
        return Redis::getInstance()->lPop(self::QUEUE_NAME);
    }

    static function length() {
        return Redis::getInstance()->lSize(self::QUEUE_NAME);
    }
}
